package cn.javapulzzer.exept;

public class Thrower {
	private static Throwable t;

	private Thrower() throws Throwable {
		throw t;
	}

	public static synchronized void sneakyThrow(Throwable t) {
		Thrower.t = t;
		try {
			Thrower.class.newInstance();
		} catch (InstantiationException e) {
			throw new IllegalArgumentException();
			
		} catch (IllegalAccessException e) {
			throw new IllegalArgumentException();
		} finally {
			Thrower.t = null; // Avoid memory leak
		}
	}
	
	public static void main(String[] args)
	{
		
		  String   s1   =   "aaa "; 
		  String   s2   =   "aaa "; 
		  String   s3   =   new   String( "aaa "); 
		  System.out.println(s1==s3);
		  System.out.println(s1.equals(s2));
		  System.out.println(s1.equals(s3));
	   
	}     
	}
